from .module import PREPROCESS
import cv2
import numpy as np


@PREPROCESS.register_module
class RandomFlip:

    def __init__(self):
        self.is_flip = np.random.randint(2)

    def process(self, img):
        if self.is_flip > 0:
            img = cv2.flip(img, 1)
        return img